/**
 * Created by yangjiao on 2019/2/28.
 */
 import send from '../../http'
 export default {
   /**
    *查询变量管理列表
    * @param data {}
    */
   queryDynamicform(data) {
     let req = {
       data: data,
       action: 'config.dynamicform.query'
     }
     return send.fetch(req, 'post')
   },
   /**
    *查询SIP号列表
    * @param data {}
    */
   querySipRefresh(data) {
     let req = {
       data: data,
       action: 'config.ivr.sip.querySipRefresh'
     }
     return send.fetch(req, 'post')
   },
   /**
    *查询变量管理列表
    * @param data {}
    */
   queryRefreshVar(data) {
     let req = {
       data: data,
       action: 'config.ivr.vars.refreshVar'
     }
     return send.fetch(req, 'post')
   },
   /**
    *删除变量
    * @param data {}
    */
   deleteVar(data) {
     let req = {
       data: data,
       action: 'config.ivr.vars.deleteVar'
     }
     return send.fetch(req, 'post')
   },
   /**
    *添加sip号
    * @param data {}
    */
   batchAddGatewaySip(data) {
     let req = {
       data: data,
       action: 'config.ivr.sip.batchAddGatewaySip'
     }
     return send.fetch(req, 'post')
   },
   /**
    *修改sip号
    * @param data {}
    */
   updateGatewayCodes(data) {
     let req = {
       data: data,
       action: 'config.ivr.sip.updateGatewayCodes'
     }
     return send.fetch(req, 'post')
   },
   /**
    *修改sip号时，绑定座席工号
    * @param data {}
    */
   bindGatewayUserExten(data) {
     let req = {
       data: data,
       action: 'config.ivr.sip.bindGatewayUserExten'
     }
     return send.fetch(req, 'post')
   },
   /**
    *sip号管理，高级搜索
    * @param data {}
    */
   advantageSearchSip(data) {
     let req = {
       data: data,
       action: 'config.ivr.sip.advantageSearchSip'
     }
     return send.fetch(req, 'post')
   },
   /**
    *sip号管理，批量管理
    * @param data {}
    */
   queryBatchSips(data) {
     let req = {
       data: data,
       action: 'config.ivr.sip.querySips'
     }
     return send.fetch(req, 'post')
   },
   /**
    * 导出客户
    * @param {Object} data
    * @param {String} data.Method 导出类型，'exportCustomer2In'
    * @param {Object} data.Query 查询条件
    * @param {String} data.Query.dbType 客户模板id
    * @param {Object} [data.Query._id] 联系计划_id的查询条件，{ $in: [] }
    * @param {*} [data.Query.*] 其他条件
    * @param {String} data.Query.menu tab页（'customer_my' => 我的客户，'customer_plan' => 联系计划，'customer_all' => 全部）
    */
   exportSipList(data) {
     const req = {
       data,
       action: 'app.excel.exportXls'
     }
     return send.fetch(req, 'post')
   },
   /**
    *sip号管理，批量管理的批量绑定工号
    * @param data {}
    */
   batchBindGatewayUserExten(data) {
     let req = {
       data: data,
       action: 'config.ivr.sip.batchBindGatewayUserExten'
     }
     return send.fetch(req, 'post')
   },
   /**
    *sip号管理，批量管理的批量绑定编码
    * @param data {}
    */
   batchUpdateCodes(data) {
     let req = {
       data: data,
       action: 'config.ivr.sip.batchUpdateCodes'
     }
     return send.fetch(req, 'post')
   },
   /**
    *变量管理 修改变量
    * @param data {}
    */
   updateVar(data) {
     let req = {
       data: data,
       action: 'config.ivr.vars.updateVar'
     }
     return send.fetch(req, 'post')
   },
   delDynamicformById(data) {
     let req = {
       data: data,
       action: 'config.dynamicform.delete'
     }
     return send.fetch(req, 'post')
   },
   delGlobalFieldById(data) {
     let req = {
       data: data,
       action: 'config.globalfield.delete'
     }
     return send.fetch(req, 'post')
   },
   // 获取全局变量
   getGlobalField(data) {
     let req = {
       data: data,
       action: 'config.globalfield.query'
     }
     return send.fetch(req, 'post')
   },
   updateGlobalFieldById(data) {
     let req = {
       data: data,
       action: 'config.globalfield.update'
     }
     return send.fetch(req, 'post')
   },
   // 添加动态表单
   createDynamicform(data) {
     let req = {
       data: data,
       action: 'config.dynamicform.create'
     }
     return send.fetch(req, 'post')
   },
   // 添加全局字段
   createGlobalField(data) {
     let req = {
       data: data,
       action: 'config.globalfield.create'
     }
     return send.fetch(req, 'post')
   },
   // 修改全局字段
   updateGlobalField(data) {
     let req = {
       data: data,
       action: 'config.globalfield.update'
     }
     return send.fetch(req, 'post')
   },
   // 删除全局字段
   deleteGlobalField(data) {
     let req = {
       data: data,
       action: 'config.globalfield.delete'
     }
     return send.fetch(req, 'post')
   },
   // 添加动态表单
   updateDynamicform(data) {
     let req = {
       data: data,
       action: 'config.dynamicform.update'
     }
     return send.fetch(req, 'post')
   },
   /**
    *外显号组管理 查询
    * @param data {}
    */
   queryGroups(data) {
     let req = {
       data: data,
       action: 'config.callerGroup.queryGroups'
     }
     return send.fetch(req, 'post')
   },
   /**
    *外显号组管理 查询
    * @param data {}
    */
   enableGroup(data) {
     let req = {
       data: data,
       action: 'config.callerGroup.enableGroup'
     }
     return send.fetch(req, 'post')
   },
   /**
    *外显号组管理 添加
    * @param data {}
    */
   addOrUpdateCallerGroup(data) {
     let req = {
       data: data,
       action: 'config.callerGroup.addOrUpdateCallerGroup'
     }
     return send.fetch(req, 'post')
   },
   /**
    *外显号组管理 删除
    * @param data {}
    */
   delGroup(data) {
     let req = {
       data: data,
       action: 'config.callerGroup.delGroup'
     }
     return send.fetch(req, 'post')
   },
   /**
    *批量添加轻量级
    * @param data {}
    */
   saveLightServiceNo(data) {
     let req = {
       data: data,
       action: 'config.ivr.serviceNo.saveLightServiceNo'
     }
     return send.fetch(req, 'post')
   },
   /**
    *批量添加服务号
    * @param data {}
    */
   saveServiceNo(data) {
     let req = {
       data: data,
       action: 'config.ivr.serviceNo.saveServiceNo'
     }
     return send.fetch(req, 'post')
   },
   /**
    *批量添加服务号 更新日程
    * @param data {}
    */
   updateSchedule1(data) {
     let req = {
       data: data,
       action: 'config.ivr.schedule.updateSchedule'
     }
     return send.fetch(req, 'post')
   }
 }
